package com.zhangyu.shadow.core.weixin.template;

import com.tencent.mm.opensdk.modelbase.BaseReq;
import com.zhangyu.shadow.core.util.toast.ToastUtils;
import com.zhangyu.shadow.core.weixin.BaseWXPayEntryActivity;

/**
 * @author zhangyu
 * @date 2017/10/26
 */

public class WXPayEntryTemplate extends BaseWXPayEntryActivity {

    @Override
    public void paySucceed() {
        justFinish("支付成功");

    }

    @Override
    public void payFailed() {
        justFinish("支付失败");
    }

    @Override
    public void payCancel() {
        justFinish("支付取消");
    }

    @Override
    public void onReq(BaseReq baseReq) {

    }

    private void justFinish(String str) {
        ToastUtils.showToast(this, str);
        finish();
        overridePendingTransition(0, 0);
    }
}
